import request from '@/utils/request'

export function doctorAdd(opt) {
  return request({
    url: '/doctor/add.json',
    method: 'post',
    data: {
      hid: opt.hid,
      did: opt.did,
      name: opt.name,
      title: opt.title,
      phone: opt.phone
    }
  })
}

export function doctorUpdate(opt) {
  return request({
    url: '/doctor/update.json',
    method: 'post',
    data: {
      id: opt.id,
      hid: opt.hid,
      did: opt.did,
      name: opt.name,
      title: opt.title,
      phone: opt.phone
    }
  })
}

export function doctorGet(query) {
  return request({
    url: '/doctor/get.json',
    method: 'get',
    params: query
  })
}

export function doctorGetList(query) {
  return request({
    url: '/doctor/getList.json',
    method: 'get',
    params: query
  })
}

export function doctorDelete(query) {
  return request({
    url: '/doctor/delete.json',
    method: 'get',
    params: query
  })
}
